package com.heima.admin.controller.v1;


import com.heima.apis.admin.IAdminAuthNewsClient;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmSensitiveDto;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/sensitive")
public class SensitiveController {

    @Autowired
    private IAdminAuthNewsClient iSensitiveClient;

    @DeleteMapping("/del/{id}")
    public ResponseResult del(@PathVariable("id") Integer id){
        return iSensitiveClient.del(id);
    }

    @PostMapping("/list")
    public PageResponseResult list(@RequestBody WmSensitiveDto wmSensitiveDto){
        return iSensitiveClient.list(wmSensitiveDto);
    }

    @PostMapping("/save")
    public ResponseResult save(@RequestBody WmSensitive wmSensitive){
        return iSensitiveClient.save(wmSensitive);
    }

    @PostMapping("/update")
    public ResponseResult update(@RequestBody WmSensitive wmSensitive){
        return iSensitiveClient.update(wmSensitive);
    }



}
